package org.ahuanlien.crm.mapper;

import org.ahuanlien.crm.domain.Employee;
import org.ahuanlien.crm.query.EmployeeQueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {

    int insert(Employee record);

    int updateByPrimaryKey(Employee record);

	int queryForCount(EmployeeQueryObject qo);

	List<Employee> queryForList(EmployeeQueryObject qo);

	Employee getByUsername(String username);

	void changeState(Long id);

	void initPassword(Long id);

	void saveRoleRelation(@Param("employeeId") Long employeeId, @Param("roleId") Long roleId);

	void removeRolenRelation(Long id);

	List<Employee> selectAll();

	String getEmpNameById(Long id);
}